add ability to build query packet