found bugs in query serialization, and refined request callback