improve visit method