made improvements to the resampling function in LDmodel_2