experimenting with single traversal method