added templated base class for serializable types