add arithmetic generation code.