removed traverse and renamed traverse2 to traverse