add query handler and query test done