Changed neighbours list to nodes and wrote toString method for nodes