flatten streams of streams
flatmap implemented