more traversing logic