added query builder generate method