refac ranking for duplicate scores