extract method "RegisterClass"