added the adding of nodes