sort result based on rating