implemented bubble sort