new PRS and calculator code based on TA feedback