basic interpreter from Peter Norvig