Create compare function to determine winner