Working version of calculator