Generate code working