updated to match new api