wrote grid_mappinginng.