working on number of queries