initial gyro code