add generic to serialization