updated distance matrix comp
branched to trim path test code