reorganized credit.c