add #register method and test