added timing to main