working grid generation