added required attr to fields