separated path and cost