public Vector randomizeVector(Vector vector1) {
  Vector newVector1 = new Vector();
  Vector vector1ToDeplete = (Vector)vector1.clone();
  Random random = new Random();
  while (vector1ToDeplete.size()>0) {
    int toDeplete = (random.nextInt() % vector1ToDeplete.size());
    if (toDeplete<0)
      toDeplete = -toDeplete;
    newVector1.add(vector1ToDeplete.get(toDeplete));
    //    System.out.println("Depleting: "+toDeplete);
    vector1ToDeplete.remove(toDeplete);
  }
  
  return vector1;
}