Writing an interpreter