update back arrow logic