reworking of evaluator, introducing more abstraction