updated querybuilder pattern