extended the functionality of bubblesort to now sort any object of sortable type