added tests for validation