Add method pointsToPath