get correct response from API