modified the registration to be more modular