Working bubble sort