added timing in matlab