added mt2_gen (backport form 70)