sort data according to score