modified gyro.js