added logic so the computer never loses