changed match to use stream