Updated cs generator