add a new class that inherits from the MG class