ADXL345 Z AXIS

HI, I maybe thinking of this the wrong way. I would have expected the Z axis on the ADXL345 (vertical axis) to show changes when twisted. Instead the read out changes along with the x axis. While the data from the x axis climbs, z axis data drops, and vice versa.
I have attached two motors to the x and y axis, it is the x and z axis I want to use. This is the code. Any help appreciated.

#include <Wire.h>

#define DEVICE (0x53)    //ADXL345 device address
#define TO_READ (6)        //num of bytes we are going to read each time (two bytes for each axis)

byte buff[TO_READ] ;    //6 bytes buffer for saving data read from the device
char str[512];                      //string buffer to transform data before sending it to the serial port




//PWM control for motor outputs 1 and 2 is on digital pin 3
int pwm_a = 3;//PWM control for motor outputs 3 and 4 is on digital pin 10
int pwm_b = 11;//direction control for motor outputs 1 and 2 is on digital pin 12
int dir_a = 12;//direction control for motor outputs 3 and 4 is on digital pin 13
int dir_b = 13;

// break control for motor output 1 and 2 is on digital pin 9
int brk_a = 9;
// break control for motor output 3 and 4 is on digital pin 8
int brk_b = 8;
//int motorspeeda;

void setup()
{
 pinMode(pwm_a, OUTPUT);   //sets all pins for motor board control to output
  pinMode(pwm_b, OUTPUT);
  pinMode(dir_a, OUTPUT);
  pinMode(dir_b, OUTPUT);
  pinMode(brk_a, OUTPUT);
  pinMode(brk_b, OUTPUT);


  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  
  //Turning on the ADXL345
  writeTo(DEVICE, 0x2D, 0);      
  writeTo(DEVICE, 0x2D, 16);
  writeTo(DEVICE, 0x2D, 8);
}

void loop()
{
  int regAddress = 0x32;    //first axis-acceleration-data register on the ADXL345
  int x, y, z;
  
  readFrom(DEVICE, regAddress, TO_READ, buff); //read the acceleration data from the ADXL345
  
   //each axis reading comes in 10 bit resolution, ie 2 bytes.  Least Significat Byte first!!
   //thus we are converting both bytes in to one int
  x = (((int)buff[1]) <<8) | buff[0];   
  y = (((int)buff[3])<<8) | buff[2];
  z = (((int)buff[5]) <<8) | buff[4];
 { 
if (x >=25) (digitalWrite(brk_a,LOW));
if (x >=25) (digitalWrite(dir_a,HIGH));
if (x >=25) (digitalWrite(pwm_a,255));

if (x <=1 ) (digitalWrite(dir_a,LOW));
if (x <=1) (digitalWrite(brk_a,LOW));
if (x <=1) (digitalWrite(pwm_a,255));


else


if(x <=25)(digitalWrite(brk_a,HIGH));
if(x >=1)(digitalWrite(dir_a,HIGH));
 }
 
 
 {
 if (y >= 10) (digitalWrite(brk_b,LOW));
 if (y >= 10) (digitalWrite(dir_b,HIGH));
 if (y >=10) (digitalWrite(pwm_b,255));
 
 if (y <= -10) (digitalWrite(dir_b,LOW));
 if (y <= -10) (digitalWrite(brk_b,LOW));
 
else
 
if(y <=10)(digitalWrite(brk_b,HIGH));
if(y >=-10)(digitalWrite(dir_b,HIGH));
}

 
{
  //we send the x y z values as a string to the serial port
  sprintf(str, "%d %d %d", x, y, z);  
  Serial.print(str);
  Serial.write(10);
}
  //It appears that delay is needed in order not to clog the port
  delay(150);
}


//---------------- Functions
//Writes val to address register on device
void writeTo(int device, byte address, byte val) {
   Wire.beginTransmission(device); //start transmission to device 
   Wire.write(address);        // send register address
   Wire.write(val);        // send value to write
   Wire.endTransmission(); //end transmission
}

//reads num bytes starting from address register on device in to buff array
void readFrom(int device, byte address, int num, byte buff[]) {
  Wire.beginTransmission(device); //start transmission to device 
  Wire.write(address);        //sends address to read from
  Wire.endTransmission(); //end transmission
  
  Wire.beginTransmission(device); //start transmission to device
  Wire.requestFrom(device, num);    // request 6 bytes from device
  
  int i = 0;
  while(Wire.available())    //device may send less than requested (abnormal)
  { 
    buff[i] = Wire.read(); // receive a byte
    i++;
  }
  Wire.endTransmission(); //end transmission
}

If you have the Z axis pointed straight UP it should read about 1G while X and Y will read about 0G.

As you rotate on the Y axis the X axis will read higher and higher until it reaches about 1G when pointed straight UP and the Z axis will drop lower and lower until it reads about 0G when the X axis is pointed straight UP.