make query slightly less of an atrocity