added stuff for accelerometer