Added check for winning