ERROR CHECKING FOR API ADDED. Works, unbelievably