easier to use registerType