updated for new api