Update with improved generate