properly reversed path cost adding