added grid type choice