added the validation