extract data from response