script to end