add map function for accurating path