refactoring & add new warning in filtering