Added accelerometer support