updated streams API and documented