CP2.B function rough draft