Implemented dynamic groupedanswer query builder