Completed gyro test code