modified 06/ original total.c