added __register__ function