little modify for random visit