added shortest path in 2d array