moved some logic from evaluator to interpreter