updated check for new api