added code for init_nodes_1