read word directly from stream instead of reading string and process it.