read characters one-by-one