added a way to exit program