refactor filter.py right now