refactored winner