added exchanging X and O and prevent replacing values