Added code for nodes