decouple node definitions from flow