Update for new api