error in total calculation