function to retrieve edges from a path ready.