simple calculator for refactoring