Improving sample size recalculation in adaptive clinical trials by resampling