write Filter class
work on stream structure