a working generator based on a tree routing
updated the rest consequently