done with distance vector alg
clean up a bit