added test for validate