add documentation to filter.py