Added code to time the task