more proper place for including pa function