refactor interpreter to its own class