fixed grid generating function