At this point in the code, there's no knowledge of whether it is a PZH, PZP or PZPWS invoking this function.

Where would I be putting the 'if' condition?  Sorry if this is a stupid question, I was just following the existing style of the code.