Added constructor parameter for grid