preparing proper serialization