unfinished tcpts algo.