updated the validation