fix api to match new api