start work on advanced query builder