replaced repository methods with query-builder ones