merge the visualization version of the MG class with the main one