refactored topic data into object