fix to fit new api