CHANGE: recovered deleted function for bellman ford