added accelerometer and gyro feature