working on transform() and finished() functions for streams