Updated SmoothStream program as requested