Add serializer and deserializer