added function for checking the countries visited by a user