added support for repo_discovery and two tests