make a hash instead of array for grid