updated mkModes script