add accelerometer detection