Modified main.c file