public Population rouletteWheel(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++){
    		maxFitScores[i]=Config.getInstance().calculateFitness(pop.population.get(i))/populationFitness;
    	}
    	
    	int outCount=0;
    	while (outCount<outSize){
    		double index = rand.nextDouble()*populationFitness;
    		for (int i = 0; i<pop.population.size(); i++){
    			if(index<=maxFitScores[i]){
    				subset[outCount]=pop.population.get(i);
    				outCount++;
    				break;
    			}
    		}
    	}
    	return new Population(subset);
    }