switched args
switched args
simplify stream reading, more robust on slow connections