updated to new api