visitor: speed up traverse