added stream and basic functionality
added stream