update bubbleSort method