added tests for serialization/deserialization