show duration of execution and some refactor
removed white line
better assertion of preorder traversal