refactoring: eliminate magic number in Calculator