Corrected calculator program