Refactor winner/loser functions