updated queries so they return array of results