solved f8 bellman_ford_opt