Update CPS calculation with new data structures

Update existing CPS calculation function to align with new data
structure introduced
3 files changed