implemented stream class, not test yet