Add p.value to rate calc function. Exclude use of original function from script