added timing to p31()