added logic for sorting the highest rated answer