added a line to getAllNodes()