traverse function

traverse