added some changes to pih.R
does some more plotting