added functions to Calculator.m