reimplemented register()