Added replacedWord method.