replace repository by collection