add custom type serializer