refactor in topicData

Signed-off-by: A. Prooks <aprooks@live.ru>