implemented djikstras by myself