use buildquery