added double back button to exit function