adding the dog class and how it works