Made the winner algorithm better