made PAM a lot smarter