private int findRule(int rule, int start) {
		int p;
		if(rule>sumOfTrueVals) {
			return -1;
		}
		for (p=start; p<=length-(rule+2); p++) {
			
			// check overall size
			if (boolVals.size()>p+rule+1) {
	
				// check left border "=false"
				if ( boolVals.get(p)==false) { 
				
					// check vals "=true"
					boolean ok = true;
					for (int j=0; j<rule; j++) {
						if (boolVals.get(p+j+1)==false) {
							ok = false;
						}
					}
					if (ok) {
						
						// check right border "=false"
						if (boolVals.get(p+rule+1)==false) {
							return p;
						}
					}
				}
			}
		}
		return -1;
	}