updates for accelerometer code