made changes to Mage