wrote code snippet to terminate app after use and also code to prompt user to use app