use treeWalk properly