added timing code and pam parameters to API