Added max path distance