added client stream code