4x4x4 led cube with 74HC595 shift register

I'm using the 74HC959 shift register with my 4x4x4 cube. When I run my code it will light up pin 6-0 then 7 when I do it one by one. I have it set to go through pin 7-0 but it seem to be pushing 7 to the end. Anyone might know whats I'm doing wrong.

int dataPin = 11;
int clockPin = 12;
int latchPin = 8;
int cat[] = {10, 9, 7, 6};  //4 layers

byte data;
 
byte dataArray[8];
 
void setup() {
 
  //set pins to output because they are addressed in the main loop
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  for (int i = 0; i < 4; i++)
  {
    pinMode(cat[i], OUTPUT);
    digitalWrite(cat[i], HIGH);  
  }

  //Using Hex decimal
  dataArray[0] = 0x80; //1000 0000
  dataArray[1] = 0x40; //0100 0000
  dataArray[2] = 0x20; //0010 0000
  dataArray[3] = 0x10; //0001 0000
  dataArray[4] = 0x08; //0000 1000
  dataArray[5] = 0x04; //0000 0100
  dataArray[6] = 0x02; //0000 0010
  dataArray[7] = 0x01; //0000 0001
  
}

void onebyone()
{
  for (int i = 0; i < 4; i++)
  {
    for (int j = 0; j < 8; j++)
    {
      digitalWrite(cat[i], LOW);
      
     data = dataArray[j];
 
    //ground latchPin and hold low for as long as you are transmitting
 
    digitalWrite(latchPin, 0);
    //move 'em out
 
    shiftOut(dataPin, clockPin, data);
    //return the latch pin high to signal chip that it
    //no longer needs to listen for information
    digitalWrite(latchPin, 1);
    delay(100);
 
  delay(100);
  
  delay(100);
  digitalWrite(cat[i], HIGH);
    }
    }
}

void loop()
{
onebyone();
}
 
// the heart of the program
void shiftOut(int dataPin, int clockPin, byte dataOut) {
  // This shifts 8 bits out MSB first,
  //on the rising edge of the clock,
  //clock idles low
 
  //internal function setup
  int i=0;
  int pinState;
 
  //for each bit in the byte myDataOut?
  //NOTICE THAT WE ARE COUNTING DOWN in our for loop
  //This means that %00000001 or "1" will go through such
  //that it will be pin Q0 that lights.
  for (i=7; i>0; i--)
  {
    digitalWrite(clockPin, 0);
 
    //if the value passed to myDataOut and a bitmask result
    // true then... so if we are at i=6 and our value is
    // %11010100 it would the code compares it to %01000000
    // and proceeds to set pinState to 1.
    if (dataOut & (1<<i))
    {
      pinState= 1;
    }
    else
    {
      pinState= 0;
    }
 
    //Sets the pin to HIGH or LOW depending on pinState
    digitalWrite(dataPin, pinState);
    //register shifts bits on upstroke of clock pin
    digitalWrite(clockPin, 1);
  }
}

I just rewire how it was running so it would work. How I had it wire was from top of the cube: bottom left up to the top then right and back down. so one side is hook up per shit register and I had it in the order of pin Q7, Q6, Q5, Q4, Q3, Q2, Q1, Q0. So I had to rewire it so Q0, Q7, Q6, Q5, Q4, Q3, Q2, Q1 that way it would light up by going up then back down. I added a second shift register and it seem to always come on when i'm not even writing to it. So can't seem to find a way to get it to not come on. Any thought on if I had it wire write and if my code was write. I just need a basic one by one to go off of to figure out whats I'm missing or can do different.