Functionnal version. Remains some fail test