need to implement dikstras and change prims