add a variable to calculate elapsed time