working version of the calculator