working bubble sort algorithm