first implementation of bubble_sort