cleaned up and tested that a query would run