reintroduce some serialization and validation stuff