query builder

added functionality