validation and inferencing