first pass at binary serialization