Added functions to track time