working bubble sort implementation