update to register()