functions for setting the winner