public static void getRunTimes(Unsigned m, Unsigned n, Unsigned t, 
      File fout, boolean opt) {
    // random System.currentTimeMillis() 
    //MemoryFarm.initMem();
    BigInt.setRandSeed(1231538606138l);  
    int pairs = m.intValue();
    long[][] worstCaseRunTimes = new long[t.intValue()][2];
    for(int j = 1; j <= t.intValue(); j++) {
      // generate m pairs of BigInts of length n*t
      int len = n.intValue() * j;
      BigInt[][] bigints = new BigInt[pairs][2];
      for(int i = 0; i < pairs; i++) {
        bigints[i][0] = new BigInt(len);
        bigints[i][1] = new BigInt(len);
      }
      // storage for execution times
      long[] koTimes = new long[pairs];
      long[] schoolTimes = new long[pairs];
      long start = 0; // record start time
      for(int i = 0; i < pairs; i++) {
        System.out.print("BigInt.getRunTimes(): computing pair " + (i + 1));
        System.out.print(" of " +  pairs + " with " + len + " digits.\n");
        // multiple them using schoolMul
        start = System.currentTimeMillis(); 
        Arithmetic.schoolMul(bigints[i][0], bigints[i][1]);
        // record exe time
        schoolTimes[i] = System.currentTimeMillis() - start; 
        // multiple them using koMul
        // don't want to record time for if statement 
        if(!opt) {
          start = System.currentTimeMillis(); 
          StudentCode.koMul(bigints[i][0], bigints[i][1]);
        }
        else {
          start = System.currentTimeMillis(); 
          StudentCode.koMulOpt(bigints[i][0], bigints[i][1]);
        }
        // record exe time
        koTimes[i] = System.currentTimeMillis() - start;
        //reset scratch space
        //MemoryFarm.dealloc();
      }
      // sort arrays in ascending order
      Arrays.sort(schoolTimes);
      Arrays.sort(koTimes); 
      // store worst case runtime
      worstCaseRunTimes[j - 1][0] = schoolTimes[pairs - 1];
      worstCaseRunTimes[j - 1][1] = koTimes[pairs - 1];
    }
    // print runtimes to output file
    try {
      BufferedWriter sOut = new BufferedWriter(new FileWriter(fout));
      for(int j = 0; j < t.intValue(); j++) {
        // print in columns "integer-size       schoolTimes     koTimes"
        sOut.write(((j + 1) * n.intValue()) + "\t" + 
                    worstCaseRunTimes[j][0] + "\t" +
                    worstCaseRunTimes[j][1] + "\n");
      }
      sOut.close();
      System.err.println("BigInt.getRunTimes() results printed to " + fout.getPath());
    }
    catch (Exception e) {//Catch exception if any
      System.err.println("ERROR. BigInt.getRunTimes() IO error " + e.getMessage());
    }
  }