prettified the topic listing code