allow subclasses to override serialization routines