Genuino 101 CurieIMU Orientation Visualiser [solved]

I tried this code , but it does not work
anyone has any suggestions

the error is:

D:\sketch_dec31a\sketch_dec31a.ino: In function 'void loop()':

sketch_dec31a:117: error: 'filter' was not declared in this scope

filter.updateIMU(gx / factor, gy / factor, gz / factor, ax, ay, az);


exit status 1
'Madgwick' does not name a type

Please install lib. Check this instruction #4 "Install the Madgwick library from Arduino IDE's library manager. To do this, open the Arduino IDE, go to "Sketch -> Include Library -> Manage Libraries". There you can search 'Madgwick' and install the library directly from there."

the library Madgwick is not on the list.
I found one on the internet and I installed but does not work.
where can I find one that works ?

I downloaded the library from here:

download ZIP and manually Installed library

the sketch now works fine