added object oriented version of calculator