working on streaming code