added filter.py, updated util.py