Reduce amount of queries used