modified remove topic code in sampleLink