refactor to just serializer