Change algorithm for fdr