fixed sorting algorithm for answers and questions