added response serializer code