Switch to new api