cpp bubble working