changed filter management to use where instead of filter