creation of a bubble sort algorithm