added accelerometer stuff