socket stream example now working