first version of filter
and some architectural changes