added ability to check server status and fixed the API call