do some refinement