fixed to use new api