adding grid generation to the api