private void addm(int m1, int m2) {
	for(int i = 0; i < ms1.length; i++) {
	    if(ms1[i] == -1) {
		ms1[i] = m1;
		ms2[i] = m2;
		return;
	    }
	}
	throw(new RuntimeException("Ran out of segment buffers!"));
    }