added stopwatch to record elapsed time