calc_total switch statement added