improve UpdateTopic and add GenerateMultiSample