added required fields validation