minor refactoring of repositories