bubble sort animation in better state