fixed up generate