simplified stream class.