cleaned up traverse method