finished the basic proof of the problem, but still need to be imrpoved especially the definition of TS is integer