i think this is incorrect. it looks like you are sorting the repos n times where n is the number of repositories.