implemented btree traversal