worked on lib/stream