updated js by removing accelerometer code