 void patternRandomLED(int repetitions){
   int i, x, y, z;
   for(i=0;i<repetitions;i++){
-    x = random(2);
-    y = random(2);
-    z = random(2);
+    x = random(4);
+    y = random(4);
+    z = random(4);
     cube[y][x][z]=1;
     render(250);
     clearCube();

  }
}

//turn all LEDs on
void fillCube(){
  int i, j, k;
  for(i=0;i<4;i++)

  }
}

// Function to draw cube map for specified number of milliseconds. 
// Alternates betwween layers for multiplexing.
// Draws the current binary cube matrix to the Arduino for 'pausetime' milliseconds.
void render(int pauseTime){
  long timer = 0;
  while(timer<=pauseTime){
    for (int k=0;k<4;k++){  // turn on only one layer of LEDs at a time
      digitalWrite(layer[k], LOW);
      for (int i=0;i<4;i++)
      {
        for (int j=0;j<4;j++)
        {
          if(cube[i][j][k] == 1){
            digitalWrite(column[i +4*j], HIGH);
          }
          else{
            digitalWrite(column[i +4*j], LOW);
          };
        }
      }
      delay(DELAY);
      digitalWrite(layer[k], HIGH);
    }
    timer += DELAY * 4;
  }
}

// turn all LEDs off
void clearCube(){
  int i, j, k;
  for(i=0;i<4;i++)
