change dist calc in polyline