add comments about how visit() works