added support for accelerometer