up number of R to 4999 in MI function to support BCa