changing winner index to winner id