define appropriate metatables for the three types of register