working on linear grating