made API call asynchronous