added getTotal function