more bubble sort refactor