work on removing infinite length paths