flattening retrieval