reinterpret_cast should actually be ok, also do some shuffling around