Normally you'd have a while loop here to control your program, something like while response is not 'q'. I see that you're calling the main prompt function at the end of each other function. The issue with this, is if the program runs for a long time, you're putting function after function after function on the stack... it could eventually overflow. So your solution isn't the most memory efficient, but it does work, especially if you're only running a few instances at a time before quitting!