added stream functions