I have re-implemented the addition of a small random number to the covariance matrix in order to reduce the chance of it being singular to ensure that the solve function works for multiple bootstraps