read string from stdin.
design note.