added a test function using pointer of function, removed the wrong versions of bubble sort