more work on validation and serialization