prepare to write str