better version of submodular greedy maxfilter