finished bubblesort implementation. works with all test cases.