added a traversal function