add topic logic