scheme-traversal implementation