made query res pprinter into a serializer