added the necessary fo refinement: refine_grid and changed make_grid accordingly