changed packing result function, added filter_percentile function, renamed filter_max to filter_sum