Gesture recognition using accelerometer data