adjust to query builder refactoring