implementing wisse's code so I can move on to the evaluating part of the assignment with a working parser.