added required validation