before resignation functionality