checking what is in d for attr(r)