REV: add logic code for back button