simplified the query builder