disconnects handled, query code now uses callbacks