better printing of stream