repair path calculations