Working with streams and sinks