generalize TS to Functor, add PESPSI, PAT packet processer.