hard work on serialization