updted script