added change_word function