oops, sorry, I guess `unless d.nil?` can be `if d`...