update with support for the new api format