windowing of grains working