updated a bubblesort method for final project