added refinement flags and set refine  method. Needs a get one