added tests and validation rules. all tests pass