refactored all lingpy path calculations to use the functions in util.