rough outline of PAM finished