added totalTime to timer