linearize paths