refactoring in filter dimension words