traverse method