more serialization implementation