Updating queries to save time