Updated to code to follow new data-validation code