Added number of cores argument to bootstrap resampling function