add inheritance for stream