add required attribute