partially finished checkValid
tester add in, almost work