just a generic bubble sort