upgraded goodbye script.