added getWinner function