update to work with current api