update the registration function