removed collapseSubPaths method