use bubble sort to complete exercise2