fix to work with the new api