JS added for accelerometer data