minor tweaks to queries