add validation tests and code