new final_sam script