fix serializer and deserializer for using Mongoose model