Bit better accelerometer implementation