added init and register set up for accelerometer