added shortest path algorithm - based on BFS