added event handler on back/forward button