improved Filter class