refactoring arithmetic2