use new attribute syntax; rm duplicated code