use pure python mfilter, it is much faster