refactoring filters as separate directive