refactored populating repositories