be a bit more general about sub attributes handled