created traversal functions