Added the option to exit of the program