some refactoring (localization, filtering)