Modified total function, fixed angular version issue