made some changes to that the generate script now works again