unnecessary queries removed