Basic filter added some refactoring