adding dynamic resize for grid