Updating to new api