optimizaing the repository