updated to shortest path alg, made graph