updated maxfilter_function.py