added restore visit functionality