clean up relation data retrieval