added new getTopic function (non-OO)