CPS calculation simplified

plese updt. ALL files