[FIX] : adapt code to the new api