match and hash for StreamIn