move it to a private method ``resolveRepositories``?