adds dijkstras algorithm and tests