Implementation of a calculator