switch to 2D simulation, using one dimension array

didn't test the result yet