added sort around code part 9