added drop_N_loci func