new usage for calculateBetaP