major updates to queries