Traverse function works