update the registration logic