rewrote CPS bits in a new file