improve repository sorting