add a common serializer