added sorting algorithm (test)