removed connection to stream codec, and changed back the implementation.