read and write string