make TraverseHierarchy a runnable class