Reformat pl calculation, no longer using reduce