Adding timing code