redo im_text() as a class