migrated remaining db queries to new query builder