removed duplicate code from the generated code (use case isOdd/isEven)