add real code for stream