simplify validation code

at least it works now, even if it doesn't do much
close #90