why bubble sort needs nested loops