Initial work on sending a query