traverse method added