latest calculator code and tests
fixed merge conflict