fixed repo = [], refactored populate_repository