revise API
first draft of interpreter (untested)