stream-adventure problem 6