work in progress, add missing tests, refactor
@done, refs calculator: add unit tests