implemented wheel dijkstra and removed duplicate code