clearing out the unnecessary queries