update the add leave part