This version begins to optimize the function by resampling fewer times and using larger matrices as Xiao suggests.