optimize memory usage
optimize memory usage
change generator