matched bellmanFord(host) to work like the other one