rewrote bubble sort in a true way