Changed bubble sort