use stream supplied in options