recursive functions and bubble sort