string calculator 2nd attempt