added hard/soft back button functionality