flattening returned response