closing script