migrated models to new query builder