Included sorting algorithm for the new task types