classic serializer logic, put in a serializer class