update streaming code