A new study sheds light on why dogs understand us