binary serialization
order states properly!