bubble sort is replaced by quick sort