this method looks to be fine with `d == null`