scrpt refinement