Implemented stream and tested it