made preliminary changes to convert ppar2.pl into a perl module