modify visit method