fixing for new api