simplify a bit; use Attr.unapply