added quick_sort and refactored init() to sort()