Added code to send all the variables to each child node