Working quick sort