refine run script