revision: first create all nodes, then link