I think I fixed getMaxDependency, am testing now