2d array simulation