Update generator.m