used Run instead of ! in genMexCode