changed logging and register()