now can calculate total time