place scripts at the bottom for better performance and fixed ldpair missing corr_alleles