Added grid generation