some work on the validation part