dijkstras algorithm function added