changed way of declaring a winner since there could be a tie