update topic function