rename word to pattern