minimize_subpaths written