fixed stackless traversal