Add streaming code