moved the binary serialization routine to a proper home