added extraction of data from response structure