finished tree translation, working