register class in the proper order