added code for back button