formatting of stream class + api