modified get_winner() function and associated model