Edited generation script