common repository code moved to RepositoryUtils