add logic when click b button go back to previous page