support for multiple repos & refactor