ex 5 of ML and bellmanford