* Moved $insert_array inside of loop t =o reset values after every cycle.
* Renamed $insert_array to $node_value_array