added function to reset all nodes