change implementation for streams