add validity tests

see #93