added mgen