Improved path calc