replace require to register