Update to work with new api