public String FindMotif(Vector Set,Vector in,double cutoff,int[] Numbers) {
    	int size = in.size();
    	int Dim = Set.elementAt(0).toString().length();
    	int Pmatrix[][] = new int[Dim][21];
    	char template[] = new char[Dim];
    	int Number  = 0 ;
    	Iterator list = in.iterator();
		String temp = "";
		int i = 0;
		int Max = 0;
        double Threshold = 1;
        if(Absoluteflag){
            Threshold = cutoff;
        }else{
		  Threshold = cutoff*size;//cutoff;//10;//cutoff*size;
        }
		if (cutoff <= 0){Threshold = 0;};
		while (list.hasNext()){
			temp = Set.elementAt((Integer)list.next()).toString();//

			for (i = Dim - 1; i >= 0; i--) {

            	Pmatrix[i][change[temp.charAt(i)]]++;

            }

		}
		String abs ="";
		for (int j = 0; j < Dim; j++) {
			Max = Selection_sort(Pmatrix[j])[21-1];
			abs += aaMap[Max]+":"+Pmatrix[j][Max]+";";
			if(Pmatrix[j][Max] >= (Threshold)){
				template[j] = aaMap[Max];
				Number++;
			}else{
				template[j] = '.';
			}
		}
		if (Number == 1){
			System.out.println(abs);

		}

		Numbers[0] = Number;
		String restemplate = "";
		int half = (Dim-1)/2;
		for (int j = 0; j < half; j++) {
			restemplate += template[j];
		}
		restemplate += centerReg;
		for (int j = half+1; j < Dim; j++) {
			restemplate += template[j];
		}
		/*
		for (int j = 0; j < Dim; j++) {
			restemplate += template[j];
		}
		*/

		return restemplate;




    }