to give the unregister and register ok