task for unregistering