updated dog.rb with solutions