writing an interpreter