moved to register method