Add register method.