reverse polish calc based off of StanfordiOS class