Sending query and results