Add validity testing