add model/class methods for validation and serialization