add total code