merge queryhandler