Got queries to work