created from_hash method on the Pet model