in/out stream usage