pseudo-cps for twisted