-modified to print the first 20 elements of the stream