adding query builder director code