update topic toggle function