added leaving and coming back