refactoring filters and prints