Created refine script