handle input/output formatting of topics