public String stochBacktrack(int start, int end){
		String seq="";
		double randCutoff = randChoose(Z[start][end]);
		if(start == end)
			return ".";
		if(start > end)
			return "";
		double base = 0;
		if(isValidPair(start,end)){
			base += Z[start+1][end-1] * energyFunction(1) ;
			if(base >= randCutoff){
				return "("+stochBacktrack(start+1,end-1)+")";
			}
		}
		base += Z[start][end-1];
		if(base >= randCutoff){
			return stochBacktrack(start,end-1)+".";
		}
		for(int k =start+1;k<end;k++){
			if(isValidPair(k,end)){
				double partial =Z[start][k-1] * Z[k+1][end] * energyFunction(1);
				base += partial;
				if(base  >= randCutoff){
					return stochBacktrack(start,k-1)+"("+stochBacktrack(k+1,end)+")";
				}
			}
		}
		return seq;
	}