Stream mode (fix #1).

some indentation issue here