changed grid type, write results to db