public void accel(double aX, double aY, double aZ) {
        velX += aX;
        velY += aY;

        velZ += aZ;

        if (Math.abs(velX) > speed) {
            velX = (velX / Math.abs(velX)) * speed;
        }
        if (Math.abs(velY) > speed) {
            velY = (velY / Math.abs(velY)) * speed;
        }
        if (Math.abs(velZ) > speed) {
            velZ = (velZ / Math.abs(velZ)) * speed;
        }

        moveswitch = true;

    }