added sort to task