Added tracking of total time and cost