added factory for serialization class