update code to traverse the dummy nodes