updating bubble sort sm