Added replaceOnes.