I'm not seeing anything that can't be done here without using raw() though?

Yeah I'm not clever enough to do that.

How would you have approached it?