upgraded to new api