finish tscube and pipesort, but need modify