calculating a 2D array