update to new api