public void sort(TapeDrive t1, TapeDrive t2, TapeDrive t3, TapeDrive t4) {
        // TODO: Implement me for 15 points
    	this.initialPass(t1, t3, t4);
    	/*
    	t1.print();
    	t2.print();
    	t3.print();
    	t4.print();
    	System.out.println("+----------+");
    	*/
    	int runs = (int)Math.ceil((Math.log((double)tapeSize/memorySize)/Math.log(2)));
    	TapeDrive src1 = t3, src2 = t4, dest1 = t1, dest2 = t2;
    	for(int i = 0; i < runs; ++i) {
    		this.doRun(src1, src2, dest1, dest2, i);
    		/*
    		t1.print();
        	t2.print();
        	t3.print();
        	t4.print();
        	System.out.println("+----------+");
    		*/
    		TapeDrive tmp = src1;
    		src1 = dest1;
    		dest1 = tmp;
    		tmp = src2;
    		src2 = dest2;
    		dest2 = tmp;
    	}
    	if(src1 != t1) {
    		for(int i = 0; i < tapeSize; ++i) {
    			t1.write(src1.read());
    		}
    	}
    }