added: code for queryHatebase