adaptation for new api