rename isLeafNode to isLeaf
reimplement queryList functionally