first attempt at bellman ford