Using Dictionary instead of 2d array.