checkApiStatus method added