ontop of the edge planner examples run byte for byte identical old and new version
code very messy but tested