updated the generate script