refine run procedure