working on stream order