fixed getAllTopics, implemented getTopicDistributionForAllInstances