adding script cancelling