pretty inefficient evaluator, but it works.