public Population stochasticUniversalSampling(Population pop, int outSize){
    	Individual [] subset = new Individual[outSize];
    	double[] maxFitScores = new double[pop.population.size()];
    	double populationFitness = pop.calculateTotalFitness();
    	
    	for (int i = 0; i<pop.population.size(); i++){//calculate the max fitness proportion space for each individual
    		if(i==0){
    			maxFitScores[i]=Config.getInstance().calculateFitness(pop.population.get(i))/populationFitness;
    		}else{
    			maxFitScores[i]=maxFitScores[i-1]+Config.getInstance().calculateFitness(pop.population.get(i))/populationFitness;
    		}    		
    	}
    	
    	double index = rand.nextDouble()*(1.0/outSize);//get random start index between 0 and 1/outSize
    	int i = 0;
    	int outCount=0;
    	while (i<pop.population.size()){
    		if (index<=maxFitScores[i]){
    			subset[outCount]=pop.population.get(i);
    			outCount++;
    			index+=1.0/outSize;
    		}else{
    			i++;
    		}
    	}
    	
    	return new Population(subset);
    }