add dispatch of hash and query