public Population elitism(Population pop, int outSize){//cut percent (rather than number)
    	Individual [] subset = new Individual[outSize];
    	//sort by fitness
    	Comparator<Individual> indComp = new Comparator<Individual>() {
    		@Override
    		public int compare(Individual a, Individual b) {
    			double diff = Config.getInstance().calculateFitness(a) - Config.getInstance().calculateFitness(b);
    			return (diff == 0) ? 0 : ((diff > 0) ? -1 : 1);
    		}
    	};
    	

    	Collections.sort(pop.population,indComp);//java 7
    	//pop.population.sort(indComp);//java 8

    	
    	//cut off
    	for(int i=0; i<outSize; i++){
    		subset[i]=pop.population.get(i);
    	}
    	
    	return new Population(subset);
    }