added test for grid generation and grid search method