changed bubble sort