added accelerometer modifications