undefined var in insert_word