update to make use of new api