add test for validity