add visited hashset