Add validation and sampling