If the number to resample is more than the number of sequence you get a error on line 155