his leash had been tied to a nearby post and when he caught sight of the little girl , the black and white dog started wagging its tail so hard its whole body looked like a kite flying in the breeze .