refining routine