added functionality to back-btn