djikstra complete with tests