work on dynamic query builder