Migration to new api