added timing check code