Updated with new api