added main to sort.