add (untested!) doc traversal