setup script
retrieving entity pairs