added socket stream (need testing)