updated the .c file