Ironed out logic for winning and lossing bug