started working on lib/stream