changed replace character to change word instead