Replaced the 2D-grid by a 3D-grid