validation + test cases