moved winner message if else out of foreach loop